package com.logica.tutorial.web;

import org.apache.wicket.Session;
import org.apache.wicket.protocol.http.WebApplication;
import org.apache.wicket.request.Request;
import org.apache.wicket.request.Response;
import org.apache.wicket.spring.injection.annot.SpringComponentInjector;

/**
 * Application object for your web application. If you want to run this application without deploying, run the Start class.
 * 
 * @see com.mycompany.Start#main(String[])
 */
public class WicketApplication extends WebApplication {    

	/**
	 * @see org.apache.wicket.Application#getHomePage()
	 */
	@Override
	public Class<TabbedPanelPage> getHomePage()
	{
		return TabbedPanelPage.class;
	}

	/**
	 * @see org.apache.wicket.Application#init()
	 */
	@Override
	public void init()
	{
		super.init();		
		getComponentInstantiationListeners().add(new SpringComponentInjector(this));
	}
	
	@Override
    public Session newSession(Request request, Response response) {
        return new CustomSession(request);
    }
}
